package com.hz.basic.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;

import com.hz.basic.dao.CbStiffBookDao;
import com.hz.basic.entity.CbStiffBookEntity;
import com.hz.basic.service.CbStiffBookService;


@Service("cbStiffBookService")
public class CbStiffBookServiceImpl extends ServiceImpl<CbStiffBookDao, CbStiffBookEntity> implements CbStiffBookService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CbStiffBookEntity> page = this.page(
                new Query<CbStiffBookEntity>().getPage(params),
                new QueryWrapper<CbStiffBookEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<CbStiffBookEntity> getstiffbook(long userId, Long sid) {
        return this.baseMapper.getstiffbook(userId, sid);
    }

}